package app

import (
	"github.com/gin-gonic/gin"
)

var routers []func(router *gin.RouterGroup) func(app *Application)

func Router(routerFun ...func(router *gin.RouterGroup) func(app *Application)) {
	routers = append(routers, routerFun...)
}

func RegisterRouter(app *Application) {
	for i := range routers {
		routers[i](&app.RouterGroup)(app)
	}
}
